<?php
namespace Admin\Model;
use \Frame\Libs\BaseModel;

final class LoginModel extends BaseModel{
	//登陆判断
	/*
	 *@param user 用户名
	 *@param md5pass md5密码
	 *@return arr
	*/
	public function login($user,$md5pass){
		$sql = "SELECT admin_id FROM love_admin WHERE admin_acc='$user' AND admin_pwd = '$md5pass'";
		return $this->pdo->fetchOne($sql);
	}
	
	public function query($user){
		$sql = "SELECT admin_id,admin_acc FROM love_admin WHERE admin_acc='$user'";
		return $this->pdo->fetchOne($sql);
	}
}
?>